<!DESCRIPTION>A good addition to your forms if they contain a multitude of check/radio buttons is a "check/uncheck all" feature. This script does just that for any group of checkboxes and radio buttons.
<!/DESCRIPTION>
<!CATEGORY>form and form validation<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<script>
function checkall(formname,checkname,thestate){
var el_collection=eval("document.forms."+formname+"."+checkname)
for (c=0;c<el_collection.length;c++)
el_collection[c].checked=thestate
}
</script>
<form name="test">
<input type="checkbox" name="v1"> Peter<br>
<input type="checkbox" name="v1"> Jane<br>
<input type="checkbox" name="v1"> George<br>
</form>
<!-- checkall(name of form, common name of checkbox group, true or false)-->